package com.danieldura.highrise.data
{
	public class WebAddress implements HighriseData
	{
		public static const WORK:String = "Work";
		public static const PERSONAL:String = "Personal";
		public static const OTHER:String = "Other";
		
		public var id:int;
		public var address:String;
		public var location:String;
		
		public function parse( data:XML ):void
		{
			id = data.id;
			address = data.address;
			location = data.location;
		}
		
		public function toXML():XML
		{
			var data:XML = new XML( "<web-address></web-address>" );
			data.id = id;
			data.address = address;
			data.location = location;
			return data;
		}
		
		public function toXMLString():String
		{
			return toXML().toXMLString();
		}
		
	}
}

/*
    <web-address>
      <id type="integer">1</id>
      <address>http://www.example.com</address>
      <location>#{ Work || Personal || Other }</location>
    </web-address>

*/